#ifndef PRELISTWID_H
#define PRELISTWID_H

#include <QListWidget>
#include <QTreeWidgetItem>
#include <QMap>
#include <QString>

class PreListWid : public QListWidget
{
    Q_OBJECT
public:
    PreListWid(QWidget *parent = nullptr);
    ~PreListWid();

private:
    void AddListItem(const QString &path);

    QMap<QString, QListWidgetItem *> _set_items;
    int _global; // 计数器
    QPoint _pos_origin;
    int _last_index;

public slots:
    void SlotUpPreList(QTreeWidgetItem *tree_item);
    void SlotUpSelect(QTreeWidgetItem *tree_item);

protected:
    void SlotItemPressed(QListWidgetItem *item);

signals:
    void SigUpSelectShow(QString path);
};

#endif // PRELISTWID_H
